package testing;

import bitetorrent.MyThread;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author user
 */
public class ClientThread extends MyThread {
    Socket s;
    InputStream in;

    public ClientThread(Socket s) {
        this.s = s;
    }

    @Override
    public void run() {
        try {
            in = s.getInputStream();
            while (true) {
                System.out.print((char)in.read());
            }
        } catch (IOException ex) {
            Logger.getLogger(ClientThread.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
